﻿@{
    ViewBag.Title = "Index";
    Layout = "~/Views/Shared/_Index.cshtml";
}
<script src="~/lib/jquery.ui/1.12.1/jquery-ui.min.js" charset="utf-8"></script>
<link href="~/lib/jquery.ui/1.12.1/jquery-ui.min.css" rel="stylesheet" />
<link href="~/css/stepcss.css" rel="stylesheet" />
<script>
    var setup_draggable = function () {
        $(".draggable").draggable({
            appendTo: "body",
            helper: "clone"
        });
        $(".droppable").droppable({
            accept: ".draggable",
            helper: "clone",
            hoverClass: "droppable-active",
            drop: function (event, ui) {
                $(".empty-form").remove();
                var $orig = $(ui.draggable);
                if (!$(ui.draggable).hasClass("dropped")) {
                    var $el = $orig.clone().addClass("dropped").css({ "position": "static", "left": null, "right": null }).appendTo(this);
                    var id = $orig.find(":input").attr("id");
                    if (id) {
                        id = id.split("-").slice(0, -1).join("-") + "-" + (parseInt(id.split("-").slice(-1)[0]) + 1);
                        $orig.find(":input").attr("id", id);
                        $orig.find("label").attr("for", id)
                    }
                    //$('<p class="tools col-sm-12 col-sm-offset-3"><a class="edit-link">编辑HTML<a></p>').appendTo($el)
                } else {
                    if ($(this)[0] != $orig.parent()[0]) {
                        var $el = $orig.clone().css({ "position": "static", "left": null, "right": null }).appendTo(this);
                        $orig.remove()
                    }
                }
            }
        }).sortable();
    };
    layui.use(['element', 'table', 'form', 'step', 'common', 'dtree', 'laydate', 'xmSelect', 'optimizeSelectOption'], function () {
        var $ = layui.$,
            form = layui.form,
            element = layui.element,
            xmSelect = layui.xmSelect,
            dtree = layui.dtree,
            table = layui.table,
            laydate = layui.laydate,
            common = layui.common,
            step = layui.step;
        var keyValue = $.request("keyValue");
        //权限字段
        common.authorizeFields('stepForm');
        wcLoading.close();
        //执行一个laydate实例
        laydate.render({
            elem: '#CreateDate'
            , btns: ['clear', 'now']
            , type: 'datetime'
            , trigger: 'click',
            format: 'yyyy-MM-dd HH:mm',
        });
        //初始化步骤控件
        step.render({
            elem: '#stepForm',
            filter: 'stepForm',
            width: '100%', //设置容器宽度
            stepWidth: '600px',
            height: '430px',
            stepItems: [{
                title: '基本配置'
            }, {
                title: '列表界面'
            }, {
                title: '表单页面'
            }, {
                title: '代码预览'
            }]
        });
        var baseConfig;
        $(function () {
            setup_draggable();
            $("#OutputModule").bindSelect({
                url: "/SystemManage/Module/GetSelectJson",
            });
            if (!!keyValue) {
                common.ajax({
                    url: "/SystemManage/CodeGenerator/GetBaseConfigJson",
                    dataType: "json",
                    data: { keyValue: keyValue },
                    async: false,
                    success: function (data) {
                        baseConfig = data;
                        common.val('stepForm', data);
                        common.val('stepForm', data.FileConfig);
                        common.val('stepForm', data.OutputConfig);
                        $("#n_columns").val(data.PageForm.ShowMode);
                        var datas = [];
                        for (let i in data.PageIndex.ColumnList) {
                            let o = {};
                            o["TableColumn"] =i;
                            o["Remark"] = data.PageIndex.ColumnList[i];
                            o["F_Id"] = uuid();
                            datas.push(o);
                        }
                        table.reload('currentTableId', {
                            data: datas
                        });
                        form.render();
                    }
                });
            }
        });
        ////渲染多选
        //var outputModule = common.radioSelectRender({
        //    el: '#OutputModule',
        //    name: 'outputmodule',
        //    remoteMethod: function (val, cb, show) {
        //        common.ajax({
        //            url: '/SystemManage/Module/GetSelectJson',
        //            data: { keyword: val },
        //            dataType: "json",
        //            success: function (data) {
        //                cb(data);
        //            },
        //            error: function () {
        //                cb([]);
        //            }
        //        });
        //    }
        //});
        ////清空沙雕ie存的方法
        //outputModule.setValue([]);
        //页面选择
        var outputOptions = common.multipleSelectRender({
            el: '#OutputOptions',
            remoteSearch: false,
            layVerify: 'required',
            layVerType: 'msg',
            data: [
                { text: '菜单显示', id: 'IsMunu', selected: true },
                { text: '是否公共', id: 'IsPublic', selected: false },
                { text: '树形表格', id: 'IsTree', selected: false },
                { text: '搜索框', id: 'IsSearch', selected: true },
                { text: '分页', id: 'IsPagination', selected: true },
                { text: '字段控制', id: 'IsFields', selected: false },
            ]
        });
        //按钮选择
        var buttonList = common.multipleSelectRender({
            el: '#ButtonList',
            remoteSearch: false,
            layVerify: 'required',
            layVerType: 'msg',
            data: [
                { text: '添加按钮', id: 'add', selected: true },
                { text: '编辑按钮', id: 'edit', selected: true },
                { text: '删除按钮', id: 'delete', selected: true },
                { text: '查看按钮', id: 'details', selected: true },
            ]
        });
        //var templist;
        ////字段选择
        //var columnList = common.multipleSelectRender({
        //    el: '#ColumnList',
        //    name: 'columnlist',
        //    layVerify: 'required',
        //    layVerType: 'msg',
        //    pageSize: 3,//分页大小
        //    //model: {
        //    //    label: {
        //    //        type: 'setnum', //自定义与下面的对应
        //    //        setnum: {
        //    //            template(data, sels) {
        //    //                return "已选中 " + sels.length + " 项, 共 " + data.length + " 项"
        //    //            }
        //    //        },
        //    //    }
        //    //},
        //    remoteMethod: function (val, cb, show) {
        //        common.ajax({
        //            url: '/SystemManage/CodeGenerator/GetTableFieldFilterSelectJson',
        //            dataType: "json",
        //            data: { keyValue: keyValue, keyword: val },
        //            success: function (data) {
        //                templist = data;
        //                cb(data);
        //            },
        //            error: function () {
        //                cb([]);
        //            }
        //        });
        //    }
        //});
        ////清空沙雕ie存的方法
        //columnList.setValue([]);
        ////赋值
        //for (var i = 0; i < templist.length; i++) {
        //    columnList.append([templist[i].id]);
        //}
        common.rendertable({
            elem: '#currentTableId',
            id: 'currentTableId',
            data: [],
            limit: 9999,//每页数据 默认
            page: { //支持传入 laypage 组件的所有参数（某些参数除外，如：jump/elem） - 详见文档
                layout: ['count'] //自定义分页布局
                , first: false //不显示首页
                , last: false //不显示尾页
            },
            
            height: 'full-220',
            defaultToolbar:false,//默认工具栏
            cols: [[
                { field: 'TableColumn', title: '字段编号', width: 200 },
                { field: 'Remark', title: '字段名称', minWidth: 200 },
            ]]
        });
        var entity;
        table.on('row(currentTableFilter)', function (obj) {
            obj.tr.addClass("layui-table-click").siblings().removeClass("layui-table-click");
            entity = obj;
        })
        table.on('toolbar(currentTableFilter)', function (obj) {
            if (obj.event === 'add') {  // 监听操作
                common.modalOpen({
                    title: "添加字段",
                    url: "/SystemManage/CodeGenerator/RuleForm",
                    width: "400px",
                    height: "400px",
                });
            }
            else if (obj.event === 'delete') {
                if (entity == null) {
                    common.modalMsg("未选中数据", "warning");
                    return false;
                }
                common.modalConfirm("注：您确定要删除该项数据吗？", function (r) {
                    if (r) {
                        var index = parent.layer.load(0, {
                            shade: [0.5, '#000'], //0.1透明度的背景
                        });
                        try {
                            var cachedata = table.cache.currentTableId;
                            for (var i = 0; i < cachedata.length; i++) {
                                if (entity.data.F_Id == cachedata[i].F_Id) {
                                    cachedata.splice(i, 1);
                                    break;
                                }
                            }
                            var divId = "#" + "div" + entity.data.TableColumn;
                            if ($(divId).length > 0) {
                                $(divId).remove();
                            }
                            table.reload('currentTableId', {
                                data: cachedata
                            });
                            entity = null;
                            common.modalMsg("操作成功", "success");
                        } catch (e) {
                            alert(e);
                        }
                        parent.layer.close(index);
                    }
                    else {
                        return false;
                    }
                });
            }
            else if (obj.event === 'edit') {
                if (entity == null) {
                    common.modalMsg("未选中数据", "warning");
                    return false;
                }
                common.modalOpen({
                    title: "编辑字段",
                    url: "/SystemManage/CodeGenerator/RuleForm",
                    width: "400px",
                    height: "400px",
                    data: entity.data
                });
            }
            return false;
        });
        form.on('select(n_columns)', function (data) {
            var v = $("select[name=n_columns").val();
            if (v === "1") {
                var $col = $(".layui-card-body .layui-col-md12").toggle(true);
                $(".layui-card-body .layui-col-md6 .draggable").each(function (i, el) {
                    $(this).remove().appendTo($col);
                });
                $(".layui-card-body .layui-col-md6").toggle(false);
            } else {
                var $col = $(".layui-card-body .layui-col-md6").toggle(true);
                $(".layui-card-body .layui-col-md12 .draggable").each(function (i, el) {
                    $(this).remove().appendTo(i % 2 ? $col[1] : $col[0]);
                });
                $(".layui-card-body .layui-col-md12").toggle(false);
            }
        });
        form.on('submit(formStep1)', function (data) {
            baseConfig.FileConfig.ClassPrefix = data.field.ClassPrefix;
            baseConfig.FileConfig.EntityName = data.field.ClassPrefix + "Entity";
            baseConfig.FileConfig.ServiceName = data.field.ClassPrefix + "Service";
            baseConfig.FileConfig.ControllerName = data.field.ClassPrefix + "Controller";
            baseConfig.FileConfig.ClassDescription = data.field.ClassDescription;
            baseConfig.FileConfig.CreateUserName = data.field.CreateUserName;
            baseConfig.FileConfig.CreateDate = data.field.CreateDate;
            baseConfig.OutputConfig.OutputModule = $("#OutputModule option:selected").text().replace(/^\s+|\s+$/g, "");
            step.next('#stepForm');
            return false;
        });
        var cout = 0;
        form.on('submit(formStep2)', function (data) {
            if (outputOptions.getValue('value').length == 0) {
                outputOptions.warning();
                return false;
            }
            if (buttonList.getValue('value').length == 0) {
                buttonList.warning();
                return false;
            }
            //if (columnList.getValue('value').length == 0) {
            //    columnList.warning();
            //    return false;
            //}
            var options = outputOptions.getValue('value');
            if (options.indexOf("IsMunu") > -1) {
                baseConfig.PageIndex.IsMunu = 1;
            }
            else {
                baseConfig.PageIndex.IsMunu = 0;
            }
            if (options.indexOf("IsSearch") > -1) {
                baseConfig.PageIndex.IsSearch = 1;
            }
            else {
                baseConfig.PageIndex.IsSearch = 0;
            }
            if (options.indexOf("IsTree") > -1) {
                baseConfig.PageIndex.IsTree = 1;
            }
            else {
                baseConfig.PageIndex.IsTree = 0;
            }
            if (options.indexOf("IsPagination") > -1) {
                baseConfig.PageIndex.IsPagination = 1;
            }
            else {
                baseConfig.PageIndex.IsPagination = 0;
            }
            if (options.indexOf("IsFields") > -1) {
                baseConfig.PageIndex.IsFields = 1;
            }
            else {
                baseConfig.PageIndex.IsFields = 0;
            }
            if (options.indexOf("IsPublic") > -1) {
                baseConfig.PageIndex.IsPublic = 1;
            }
            else {
                baseConfig.PageIndex.IsPublic = 0;
            }
            baseConfig.PageIndex.ButtonList = buttonList.getValue('value');
            var cachedata = table.cache.currentTableId
            if (cachedata.length == 0) {
                common.modalMsg("未添加字段", "warning");
                return false;
            }
            baseConfig.PageIndex.ColumnList = [];
            var treelist = [];
            for (var i = 0; i < cachedata.length; i++) {
                var temp = {};
                var treetemp = {};
                temp["key"] = cachedata[i].TableColumn;
                temp["value"] = cachedata[i].Remark;
                baseConfig.PageIndex.ColumnList.push(temp);
                treetemp["id"] = cachedata[i].TableColumn;
                treetemp["title"] = cachedata[i].Remark;
                treetemp["parentId"] = "0";
                treetemp["checkArr"] = "0";
                treelist.push(treetemp);
            }
            //form字段选择
            var formColumnList = dtree.render({
                elem: "#formColumnList",
                height: 'full-200',
                width: '180px',
                checkbar: true,
                checkbarType: "all", // 默认就是all，其他的值为： no-all  p-casc   self  only
                method: "GET",
                scroll: "#toolbarDiv", // 绑定div元素
                ficon: "-1",
                icon: "-1",  // 显示非最后一级节点图标，隐藏最后一级节点图标
                initLevel: 0,
                data: treelist,
                checkbarFun: {
                    chooseBefore: function ($i, node) {
                        var id = node.nodeId;
                        var divId = "#" + "div" + id;
                        if (node.checked == "0") {
                            if ($(divId).length == 0) {

                                var target = null;
                                if (parseInt($("#n_columns").val()) == 1) {
                                    target = $(".layui-card-body .layui-col-md12");
                                }
                                else {
                                    var firstColumnInput = $(".layui-card-body .layui-col-md6").first().find("input").length;
                                    var secondColumnInput = $(".layui-card-body .layui-col-md6").last().find("input").length;
                                    if (firstColumnInput > secondColumnInput) {
                                        target = $(".layui-card-body .layui-col-md6").last();
                                    }
                                    else {
                                        target = $(".layui-card-body .layui-col-md6").first();
                                    }
                                }
                                var html = $("#divInputTemplate").prop("outerHTML");
                                html = html.replace("FieldName", node.context);
                                html = html.replace(/fieldName/g, "fieldName" + cout);
                                html = html.replace(/fieldCode/g, id); // 替换多个
                                html = html.replace("divInputTemplate", "div" + id);
                                var obj = $(html);
                                obj.removeAttr("style");
                                obj.appendTo(target);
                                formColumnList.checkStatus($i).check();
                                cout++;
                            }
                        }
                        else {
                            if ($(divId).length > 0) {
                                $(divId).remove();
                            }
                            formColumnList.checkStatus($i).noCheck();  // 恢复选中状态
                        }
                    },
                    chooseDone: function (checkbarNodesParam) { //复选框点击事件完毕后，返回该树关于复选框操作的全部信息。
                        return;
                    }
                }
            });
            //tree单击节点 监听事件
            dtree.on("node('formColumnList')", function (obj) {
                formColumnList.clickNodeCheckbar(obj.param.nodeId);// 点击节点选中复选框
                var id = obj.param.nodeId;
                var divId = "#" + "div" + id;
                if (obj.param.checked == "0") {
                    if ($(divId).length == 0) {

                        var target = null;
                        if (parseInt($("#n_columns").val()) == 1) {
                            target = $(".layui-card-body .layui-col-md12");
                        }
                        else {
                            var firstColumnInput = $(".layui-card-body .layui-col-md6").first().find("input").length;
                            var secondColumnInput = $(".layui-card-body .layui-col-md6").last().find("input").length;
                            if (firstColumnInput > secondColumnInput) {
                                target = $(".layui-card-body .layui-col-md6").last();
                            }
                            else {
                                target = $(".layui-card-body .layui-col-md6").first();
                            }
                        }
                        var html = $("#divInputTemplate").prop("outerHTML");
                        html = html.replace(/FieldName/g, obj.param.context);
                        html = html.replace(/fieldName/g, "fieldName" + cout);
                        html = html.replace(/fieldCode/g, id); // 替换多个
                        html = html.replace("divInputTemplate", "div" + id);
                        var obj = $(html);
                        obj.removeAttr("style");
                        obj.appendTo(target);
                        cout++;
                    }
                }
                else {
                    if ($(divId).length > 0) {
                        $(divId).remove();
                    }
                }

            });
            step.next('#stepForm');
            return false;
        });
        var codeList;
        form.on('submit(formStep3)', function (data) {
            baseConfig.PageForm.ShowMode = $("#n_columns").val();
            baseConfig.PageForm.FieldList = [];
            $("#divForm label:not(.hidden)").each(function (i, ele) {
                if ($(ele).parent().css("display") != "none") {
                    var key = $(ele).parent().find("input")[0].id;
                    var temp = {};
                    temp["key"] = key;
                    temp["value"] = $(ele).html();
                    baseConfig.PageForm.FieldList.push(temp);
                }
            });
            if (baseConfig.PageForm.FieldList.length<=0) {
                common.modalMsg("未添加表单字段", "warning");
                return false;
            }
            $.ajax({
                url: "/SystemManage/CodeGenerator/CodePreviewJson",
                type: "post",
                dataType: 'json',
                async: false,
                data: baseConfig,
                success: function (data) {
                    if (data.state == "success") {
                        $("div.layui-tab-item").each(function (i, ele) {
                            var col = $(ele).attr("col");
                            if (col == "CodeMenu") {
                                $(this).html("<pre class='no-padding no-margin no-top-border'><code class='html'>" + data.data[col] + "</code></pre>");
                            }
                            else {
                                $(this).html("<pre class='no-padding no-margin no-top-border'><code class='csharp'>" + data.data[col] + "</code></pre>");
                            }
                        });
                        //$('pre code').each(function (i, ele) {
                        //    hljs.highlightBlock(ele)
                        //});
                        codeList = data.data;
                        step.next('#stepForm');
                    }
                    else {
                        common.modalAlert(data.message, data.state);
                    }
                }
            });
            return false;
        });
        form.on('submit(formStep4)', function (data) {
            // 单击之后提交按钮不可选,防止重复提交
            $('.site-demo-active').addClass('layui-btn-disabled');
            $('.site-demo-active').attr('disabled', 'disabled');
            var postData = baseConfig;
            postData.Code = encodeURIComponent(JSON.stringify(codeList));
            common.submitForm({
                url: "/SystemManage/CodeGenerator/CodeGenerateJson",
                param: postData,
                success: function () {
                }
            })
            return false;
        });
        $('.pre').click(function () {
            step.pre('#stepForm');
        });
    })
    function editName(data) {
        var key = $('#' + data).parent().find("input")[0].id;
        var value = $('#' + data).html();
        
        layui.use(['jquery', 'form', 'laydate', 'common'], function () {
            layui.common.modalOpen({
                title: "修改值",
                url: "/SystemManage/CodeGenerator/AddForm?parentform=" + window.name + "&event=" + data,
                width: "400px",
                height: "400px",
                data: { TableColumn: key, Remark:value},
            });
        });
    }
</script>
<div class="layuimini-container">
    <div class="layuimini-main">
        <div class="layui-carousel" id="stepForm" lay-filter="stepForm">
            <div carousel-item>
                <div>
                    <form class="layui-form layuimini-form">
                        <div class="layui-form-item layui-hide">
                            <label class="layui-form-label required">类名前缀</label>
                            <div class="layui-input-block">
                                <input type="text" id="ClassPrefix" name="ClassPrefix" autocomplete="off" lay-verify="required" maxlength="50" class="layui-input">
                            </div>
                        </div>
                        <div class="layui-form-item layui-hide">
                            <label class="layui-form-label required">界面名称</label>
                            <div class="layui-input-block">
                                <input type="text" id="ClassDescription" name="ClassDescription" autocomplete="off" maxlength="50" lay-verify="required" class="layui-input">
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label required">输出模块名</label>
                            <div class="layui-input-block">
                                <select id="OutputModule" name="OutputModule" lay-filter="OutputModule" lay-verify="required" lay-search>
                                    <option value="">请选择</option>
                                </select>
                            </div>
                        </div>
                        <div class="layui-form-item layui-hide">
                            <label class="layui-form-label required">创建人员</label>
                            <div class="layui-input-block">
                                <input type="text" id="CreateUserName" name="CreateUserName" autocomplete="off" maxlength="50" lay-verify="required" class="layui-input">
                            </div>

                        </div>
                        <div class="layui-form-item layui-hide">
                            <label class="layui-form-label required">创建日期</label>
                            <div class="layui-input-block">
                                <input type="text" id="CreateDate" name="CreateDate" autocomplete="off" lay-verify="required" class="layui-input">
                            </div>
                        </div>
                        <div class="form-group-bottom text-right">
                            <div class="layui-input-block">
                                <button class="layui-btn" lay-submit lay-filter="formStep1">下一步</button>
                            </div>
                        </div>
                    </form>
                </div>
                <div>
                    <form class="layui-form layuimini-form">
                        <div class="layui-form-item">
                            <label class="layui-form-label required">页面选项</label>
                            <div class="layui-input-block">
                                <div id="OutputOptions" name="OutputOptions" class="xm-select-demo">
                                </div>
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label required">按钮选项</label>
                            <div class="layui-input-block">
                                <div id="ButtonList" name="ButtonList" class="xm-select-demo">
                                </div>
                            </div>
                        </div>
                        @*<div class="layui-form-item">
                            <label class="layui-form-label required">字段选择</label>
                            <div class="layui-input-block">
                                <div id="ColumnList" name="ColumnList" class="xm-select-demo"></div>
                            </div>
                        </div>*@
                        <div class="form-group-bottom text-right">
                            <div class="layui-input-block">
                                <button type="button" class="layui-btn layui-btn-primary pre">上一步</button>
                                <button class="layui-btn" lay-submit lay-filter="formStep2">下一步</button>
                            </div>
                        </div>
                    </form>
                    <script type="text/html" id="toolbarDemo">
                        <div class="layui-btn-container" id="toolbar">
                            <button class="layui-btn layui-btn-sm data-add-btn" lay-event="add"><i class="layui-icon">&#xe654;</i>新建</button>
                            <button class="layui-btn layui-btn-sm layui-btn-warm data-edit-btn" lay-event="edit"><i class="layui-icon">&#xe642;</i>修改</button>
                            <button class="layui-btn layui-btn-sm layui-btn-danger data-delete-btn" lay-event="delete"> <i class="layui-icon">&#xe640;</i>删除</button>
                        </div>
                    </script>
                    <table class="layui-hide" id="currentTableId" lay-filter="currentTableFilter"></table>
                </div>
                <div>
                    <form class="layui-form layuimini-form ">
                        <div class="layui-fluid" style="padding:0 0px">
                            <div class="layui-row layui-col-space5">
                                <div class="layui-card layui-col-md3 layui-col-xs4">
                                    <div class="layui-card-header"><i class="fa fa-warning icon"></i>字段选择</div>
                                    <div class="layui-card-body" style="background-color:#cce3ff3b" id="toolbarDiv">
                                        <ul id="formColumnList" name="formColumnList" class="dtree" data-id="0"></ul>
                                    </div>
                                </div>
                                <div class="layui-card layui-col-md9 layui-col-xs8">
                                    <div class="layui-card-header layui-col-md3 layui-col-xs5">
                                        <i class="fa fa-warning icon"></i>列数
                                    </div>
                                    <div class="layui-card-header layui-col-md9  layui-col-xs7">
                                        <select id="n_columns" name="n_columns" lay-filter="n_columns">
                                            <option value="1">显示1列</option>
                                            <option value="2">显示2列</option>
                                        </select>
                                    </div>
                                    <div class="layui-card-body" id="divForm">
                                        <div id="divInputTemplate" class="layui-form-item draggable ui-draggable dropped" style="display:none">
                                            <label class="layui-form-label" id="fieldName">FieldName</label>
                                            <div class="layui-input-block" style="padding-right: 70px;">
                                                <input id="fieldCode" col="fieldCode" type="text" class="layui-input" readonly value="fieldCode">
                                                <button class="layui-btn layui-btn-normal data-info-btn" style="position: absolute;top: 0;right: 6px;cursor: pointer;" type="button" onclick="editName('fieldName')">编辑</button>
                                            </div>
                                        </div>
                                        <div class="layui-col-md12 layui-col-xs12 droppable sortable">
                                        </div>
                                        <div class="layui-col-md6 layui-col-xs6 droppable sortable" style="display:none">
                                        </div>
                                        <div class="layui-col-md6 layui-col-xs6 droppable sortable" style="display:none">
                                        </div>
                                    </div>
                                    </div>
                            </div>
                            </div>
                        <div class="form-group-bottom text-right">
                            <div class="layui-input-block">
                                <button type="button" class="layui-btn layui-btn-primary pre">上一步</button>
                                <button class="layui-btn" lay-submit lay-filter="formStep3">下一步</button>
                            </div>
                        </div>
                    </form>
                </div>
                <div>
                    <form class="layui-form layuimini-form">
                        <div class="layui-tab">
                            <ul class="layui-tab-title">
                                <li class="layui-this">实体类</li>
                                <li>服务类</li>
                                <li>控制器</li>
                                <li>列表页</li>
                                <li>表单页</li>
                                <li>详情页</li>
                                <li>菜单</li>
                            </ul>
                            <div class="layui-tab-content" style="height:300px;overflow:auto">
                                <div class="layui-tab-item layui-show" id="codeEntity" col="CodeEntity">
                                </div>
                                <div class="layui-tab-item" id="codeService" col="CodeService">
                                </div>
                                <div class="layui-tab-item" id="codeController" col="CodeController">
                                </div>
                                <div class="layui-tab-item" id="codeIndex" col="CodeIndex">
                                </div>
                                <div class="layui-tab-item" id="codeForm" col="CodeForm">
                                </div>
                                <div class="layui-tab-item" id="codeDetails" col="CodeDetails">
                                </div>
                                <div class="layui-tab-item" id="codeMenu" col="CodeMenu">
                                </div>
                            </div>
                        </div>
                        <div class="form-group-bottom text-right">
                            <div class="layui-input-block">
                                <button type="button" class="layui-btn layui-btn-primary pre">上一步</button>
                                <button class="layui-btn site-demo-active" lay-submit lay-filter="formStep4">确认生成</button>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>

    </div>
</div>
